define(function(){
    return function(goodsMsg,id,cb){
        let i = 0;
        goodsMsg.some((val,index)=>{
            i = index;
            return val.id === id;
        })
        cb(i);
        localStorage.setItem("goodsMsg",JSON.stringify(goodsMsg));
    }
})